package com.ruge.user.domain.model;

import com.ruge.core.domain.BaseDomain;
import com.ruge.core.enums.IntegralEnum;
import lombok.*;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author ruge.wu
 * @since 2022/2/11 10:44
 */
@Getter
@Setter
@Builder
@Entity
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "integral_log")
@org.hibernate.annotations.Table(appliesTo = "integral_log", comment = "积分-用户领取数据")
public class IntegralLog extends BaseDomain implements Serializable {
    @Column(columnDefinition = "int comment '用户id'")
    private Long aid;
    @Column(columnDefinition = "int comment '积分值'")
    private Integer integral;
    @Column(columnDefinition = "varchar(100)  comment '积分规则类型'")
    @Enumerated(value = EnumType.STRING)
    private IntegralEnum integralType;
    @Column(columnDefinition = "varchar(20)  comment '积分规则名称'")
    private String integralName;
}